<template>
  <div>
    <el-row class="tac">
        <el-col :span="24">
            <!-- <h5 style="height: 40px">默认颜色</h5> -->
            <el-menu
            :default-active="activeIndex"
            class="el-menu-vertical-demo"
            router>
            <!-- <el-submenu index="1"> -->
            <el-menu-item index="/m/commodity">
                <i class="el-icon-menu"></i>
                <span slot="title">商品管理</span>
            </el-menu-item>
            <!-- <el-menu-item index="/user" :disabled="role==1?true:false"> -->
            <el-menu-item index="/m/user" v-if="manger!=null">
                <i class="el-icon-s-custom"></i>
                <span slot="title">用户管理</span>
            </el-menu-item>
            <el-menu-item @click="tips">
            <!-- <el-menu-item index="order"> -->
                <i class="el-icon-document"></i>
                <span slot="title">订单管理</span>
            </el-menu-item>
            <el-menu-item @click="tips">
                <i class="el-icon-setting"></i>
                <span slot="title">导航四</span>
            </el-menu-item>
            <el-menu-item @click="tips">
                <i class="el-icon-setting"></i>
                <span slot="title">导航五</span>
            </el-menu-item>
            <el-menu-item @click="tips">
                <i class="el-icon-setting"></i>
                <span slot="title">导航六</span>
            </el-menu-item>
            </el-menu>
        </el-col>
    </el-row>

  </div>
</template>

<script>
export default {
    created(){
        // this.role=this.$store.state.user.identity
        this.user = this.$store.state.user
        this.manger = this.$store.state.manger
        // if(this.$store.state.user!=null){
        //     this.role = 1
        // }else{
        //     this.role = -1
        // }
    },
    data(){
        return{
            user:null,
            manger:null,
            // role:0,//1是商家，非1是管理员
            activeIndex: this.$route.path   //绑定当前的route
        }
    },
    methods: {
        tips(){
            this.$message({
                type: "error",
                message: "未完工"
            })
        }
    }
}
</script>

<style>

</style>